<template>
  <div class="nav_container">
      <div class="nav_back">
        <span 
        @click="change" 
        v-show="this.$route.meta.isShowSelect" 
        style="color:red"
        >{{this.text}}</span>
        <img 
        src="../../assets/icon/fanhui.png" 
        v-show="this.$route.meta.isShowNavBack" 
        @click="back" alt="">
      </div>
      <div class="nav_title">{{this.$route.meta.title}}</div>
      <div class="nav_select"></div>
  </div>
</template>

<script>
import mixin from '../../store/index'
export default {
  mixins: [mixin],
  data() {
    return {
      isShow: this.$route.meta.isShowSelect
    }
  },
  methods: {
    back() {
      window.history.back()
    },
    change() {
      this.isShow = !this.isShow
      this.onText(this.isShow)
      // this.$store.commit('CHANGE_SELECT', this.isShow)
    }
  }
}
</script>

<style>
.nav_container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 1.1rem;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav_back {
  width: 15%;
  text-align: center;
}
.nav_title {
  width: 70%;
  text-align: center;
}
.nav_select {
  width: 15%;
  text-align: center;
}
</style>